package com.ktjiaoyu.crm;

import org.apache.shiro.crypto.hash.Md5Hash;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@SpringBootTest
@RunWith(SpringRunner.class)
public class ShiroTester {

    @Test
    public void test(){
        //加密 md5
        //加盐：czkt

        String password="123456";

        Md5Hash md5Hash=new Md5Hash(password,"czkt",2);

        //123456
        //123456czkt
        //b0c3dfa8b964d914b511090e9c7e3673
        //b0c3dfa8b964d914b511090e9c7e3673czkt
        //91097fb1f685ac7ab084e93490f7fddf

        System.out.println(md5Hash.toString());
    }
}
